<?php

class Orm extends Controller {

	function setVars()
	{
		$this->tpl['title'] = "Welcome";
		$this->tpl['head'] = '';
        $this->tpl['body'] = '';
        $this->tpl['menu'] = '';
        $this->tpl['sidebar'] = '';
	}
    
	function __construct() 
	{
		parent::Controller();
        $this->auth->CheckTaMeR(101);
		$this->setVars();
        //$this->load->model('Master_Model', 'mdb');
        $this->load->library('profiler');
	}

	
	function index()
	{
        $this->load->library('orm');
        $this->orm->editAgenda(1);
        $this->orm->post->title = 'edited title';
        $this->orm->post->description = 'this post has been edited';
        $this->orm->save(); 
        echo '<pre>';
        print_r($this->orm->find('agendas', null, 1, 0));
        echo '</pre>';
		//$this->load->view('blank',$this->tpl);
	}
}
?>